namespace Brjnk.GpxExplorer.Workspace
{
    using System;
    using System.ComponentModel;
    using Brjnk.GpxExplorer.Workspace.Searching;

    /// <summary>
    /// </summary>
    public abstract class ItemFromClipboard : INotifyPropertyChanged
    {
        public ItemFromClipboard()
        {
            creationTime = DateTime.Now;
        }

        public abstract void Execute(DataModel data, SearchService searchService);

        private DateTime creationTime;

        public DateTime CreationTime { get { return creationTime; } }

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}